﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Taotaikhoan.aspx.cs" Inherits="webtracuudiem.Admin.taotaikhoan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
    .auto-style3 {
        height: 30px;
    }
    .auto-style4 {
        font-family: serif;
        border-left-color: #A0A0A0;
        border-right-color: #C0C0C0;
        border-top-color: #A0A0A0;
        border-bottom-color: #C0C0C0;
        padding: 1px;
    }
        .auto-style5 {
        }
        .auto-style6 {
            height: 30px;
            width: 68px;
        }
        .auto-style7 {
        }
        .auto-style8 {
        }
        .auto-style9 {
        width: 126px;
    }
    .auto-style10 {
        }
    .auto-style11 {
        height: 30px;
        width: 37px;
    }
        .auto-style12 {
    }
        .auto-style24 {
            background-color: #99CC00;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="auto-style1">
         <tr>
            <td class="auto-style10">
                &nbsp;</td>
            <td class="auto-style12" colspan="2">
                <asp:Label ID="lblThongBao" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            <td class="auto-style12">Username
                  </td>
            <td>
                  <asp:TextBox ID="txtUserName" runat="server" Width="158px"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserName" ErrorMessage="Chưa nhập Username" Display="Dynamic" ValidationGroup="TaoTaiKhoan"></asp:RequiredFieldValidator>
                  <asp:CustomValidator ID="UsernameCustomValidator" runat="server" ControlToValidate="txtUserName" ErrorMessage="Username đã tồn tại" OnServerValidate="UsernameCustomValidator_ServerValidate" Display="Dynamic" ValidationGroup="TaoTaiKhoan"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            <td class="auto-style12">Password&nbsp;
                </td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" Width="158px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword" ErrorMessage="Chưa nhập Password" ValidationGroup="TaoTaiKhoan"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style11">&nbsp;</td>
            <td class="auto-style6">Nhập lại Password
                </td>
            <td class="auto-style3">
                <asp:TextBox ID="txtNhapLaiPassword" runat="server" Width="157px"></asp:TextBox>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtNhapLaiPassword" ErrorMessage="Password nhập lại không đúng" Display="Dynamic" ValidationGroup="TaoTaiKhoan"></asp:CompareValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtNhapLaiPassword" ErrorMessage="Chưa nhập lại Password" Display="Dynamic" ValidationGroup="TaoTaiKhoan"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            <td class="auto-style8">Quyền người dùng</td>
            <td class="auto-style8">
                <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="MaQuyen" DataValueField="MaQuyen">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Demo1ConnectionString %>" SelectCommand="SELECT * FROM [Quyen]"></asp:SqlDataSource>
            </td>
        </tr>
         <tr>
            <td class="auto-style10">&nbsp;</td>
            
            <td class="auto-style12">Họ tên
                </td>
            
            <td>
                <asp:TextBox ID="txtHoTen" runat="server" Width="157px"></asp:TextBox>
             </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            
            <td class="auto-style12">Ngày sinh
                </td>
            
            <td class="auto-style9">
                <asp:TextBox ID="txtNgaySinh" runat="server" Width="156px"></asp:TextBox>
             </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            <td class="auto-style7" colspan="2"><span class="auto-style4">Giới tính&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="radNam" runat="server" OnCheckedChanged="RadioButton1_CheckedChanged" Checked="True" GroupName="GioiTinh" Text="Nam" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:RadioButton ID="radNu" runat="server" GroupName="GioiTinh" Text="Nữ" />
                </span>
            </td>
        </tr>
        <tr>
            <td class="auto-style10">
                <span><a href="Qlytaikhoan.aspx" class="auto-style23"><img alt="" src="../images/Arrow_back.png" class="auto-style22" /> <span class="auto-style24">BACK</span></a></span></td>
            <td class="auto-style5" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="btnTaoTaiKhoan" runat="server" OnClick="btnTaoTaiKhoan_Click" Text="THÊM TÀI KHOẢN" Width="117px" ValidationGroup="TaoTaiKhoan" /> &nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnXoaTaiKhoan" runat="server" OnClick="btnXoaTaiKhoan_Click" Text="XÓA TÀI KHOẢN" Width="117px" ValidationGroup="XoaTaiKhoan" /> &nbsp;&nbsp;&nbsp;
                </td>
        </tr>
        <tr>
            <td class="auto-style10" colspan="3">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
                    <Columns>
                        <asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
                        <asp:BoundField DataField="password" HeaderText="Password" SortExpression="password" />
                        <asp:BoundField DataField="hoTen" HeaderText="Họ tên" SortExpression="hoTen" />
                        <asp:BoundField DataField="MaQuyen" HeaderText="Mã quyền" SortExpression="MaQuyen" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Demo1ConnectionString %>" SelectCommand=" select NguoiDung.Username,password,hoTen,MaQuyen from QuyenNguoiDung,NguoiDung
 where QuyenNguoiDung.Username=NguoiDung.Username"></asp:SqlDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
